package com.cq.androidtools.jetpack.hilt

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.ViewModelProvider
import com.cq.androidtools.R
import dagger.hilt.android.AndroidEntryPoint
import retrofit2.Retrofit
import javax.inject.Inject

/**
 * 作者: CQ
 * 日期: 2021-06-25
 * 说明:
 */
@AndroidEntryPoint
class HiltActivity : AppCompatActivity() {

    @Inject
    lateinit var truck: Truck

    @BindGasEngine
    @Inject
    lateinit var gasEngine : Engine

    @BindElectricEngine
    @Inject
    lateinit var electricEngine: Engine

    @Inject
    lateinit var networkDriver: NetworkDriver

    @Inject
    lateinit var retrofit : Retrofit

    lateinit var viewModel: MyViewModel

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.ac_hilt)
        viewModel = ViewModelProvider(this).get(MyViewModel::class.java)
        truck.deliver()
        truck.deliverDriver()
        truck.show()
        truck.showTruckInterface()
        //        adapter.service.analyticsMethods()
        gasEngine.start()
        gasEngine.shutdown()

        electricEngine.start()
        electricEngine.shutdown()


        networkDriver.application
    }


    class Cli

}